package cn.luckdou.system.model.global;

import org.apache.commons.lang.StringUtils;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 全球地区库
 * </p>
 *
 * @author Dadou
 * @since 2017-10-09
 */
@TableName("tb_global")
public class Global extends Model<Global> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 父ID
     */
	private Integer pid;
    /**
     * 路径
     */
	private String path;
    /**
     * 层级
     */
	private Integer level;
    /**
     * 中文名称
     */
	private String name;
    /**
     * 英文名称
     */
	@TableField("name_en")
	private String nameEn;
    /**
     * 中文拼音
     */
	@TableField("name_pinyin")
	private String namePinyin;
    /**
     * 代码
     */
	private String code;
	/**
	 * 无参构造方法
	 */
	public Global(){
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path =StringUtils.isNotBlank(path)?path:null;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name =StringUtils.isNotBlank(name)?name:null;
	}

	public String getNameEn() {
		return nameEn;
	}

	public void setNameEn(String nameEn) {
		this.nameEn =StringUtils.isNotBlank(nameEn)?nameEn:null;
	}

	public String getNamePinyin() {
		return namePinyin;
	}

	public void setNamePinyin(String namePinyin) {
		this.namePinyin =StringUtils.isNotBlank(namePinyin)?namePinyin:null;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code =StringUtils.isNotBlank(code)?code:null;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
